package org.sbbs.admin.manager.impl;

import jakarta.annotation.PostConstruct;
import org.sbbs.admin.dao.SysUserRepo;
import org.sbbs.admin.entity.SysUser;
import org.sbbs.admin.manager.SysUserManager;
import org.sbbs.base.jpa.manager.impl.BaseManagerImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 *
 * @author jenkins
 */
@Service
@Qualifier("sysUserManager")
public class SysUserManagerImpl extends BaseManagerImpl<SysUser, Long, SysUserRepo> implements SysUserManager {

    @Autowired
    private SysUserRepo repo;

    @PostConstruct
    public void init() {
        super.setRepo(repo);
    }

    @Override
    public SysUser findUserByUserName(String userName) {
        return repo.findByUsername(userName);
    }
}
